From ff2c592ac9aac2da126a1c629f15bebf202924e8 Mon Sep 17 00:00:00 2001 From: Colin Walters Date: Fri, 10 Jan 2014 08:15:54 -0500 Subject: [PATCH] pull: Ensure we begin a status line Otherwise if the operation completes before anything happens, we hit an assertion trying to end a status line when we didn't begin one. --- src/ostree/ot-admin-builtin-upgrade.c | 5 ++++- src/ostree/ot-builtin-pull.c | 5 ++++- 2 files changed, 8 insertions(+), 2 deletions(-) diff --git a/src/ostree/ot-admin-builtin-upgrade.c b/src/ostree/ot-admin-builtin-upgrade.c index 12495018..299c6a81 100644 --- a/src/ostree/ot-admin-builtin-upgrade.c +++ b/src/ostree/ot-admin-builtin-upgrade.c @@ -110,7 +110,10 @@ ot_admin_builtin_upgrade (int argc, char **argv, OstreeSysroot *sysroot, GCancel console = gs_console_get (); if (console) - progress = ostree_async_progress_new_and_connect (ot_common_pull_progress, console); + { + gs_console_begin_status_line (console, "", NULL, NULL); + progress = ostree_async_progress_new_and_connect (ot_common_pull_progress, console); + } g_print ("Fetching remote %s ref %s\n", origin_remote, origin_ref); diff --git a/src/ostree/ot-builtin-pull.c b/src/ostree/ot-builtin-pull.c index 67305fdc..7aa028a7 100644 --- a/src/ostree/ot-builtin-pull.c +++ b/src/ostree/ot-builtin-pull.c @@ -66,7 +66,10 @@ ostree_builtin_pull (int argc, char **argv, OstreeRepo *repo, GCancellable *canc console = gs_console_get (); if (console) - progress = ostree_async_progress_new_and_connect (ot_common_pull_progress, console); + { + gs_console_begin_status_line (console, "", NULL, NULL); + progress = ostree_async_progress_new_and_connect (ot_common_pull_progress, console); + } if (!ostree_repo_pull (repo, remote, refs_to_fetch ? (char**)refs_to_fetch->pdata : NULL, pullflags, progress, cancellable, error)) -- 2.30.2